Test latency jitter under stress condition Single-threaded executor Default autoware with hot path
In [1]:
from caret_analyze.plot import Plot
from caret_analyze.plot import chain_latency
from caret_analyze import Application, Architecture, Lttng
from bokeh.plotting import output_notebook, figure, show
from caret_analyze import Architecture, Application, Lttng
from bokeh.plotting import output_notebook
output_notebook()
End-to-End path¶
In [2]:
lttng = Lttng('./multi_threaded_executor_normal_fixed_workload')
arch = Architecture('yaml','./architecture_with_e2e_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
converting: 265121it [00:14, 18786.95it/s]
265027 events found.
loading: 100%|████████████████████████████████████████████████████████████▉| 265025/265027 [00:07<00:00, 34960.38it/s]
In [3]:
# arch.export('architecture.yaml')
In [4]:
# p = arch.search_paths('/FrontLidarDriver','/RayGroundFilter','/MPCController','/VehicleDBWSystem')
# p[0].summary.pprint()
In [5]:
# arch.add_path('e2e_path',p[0])
# app =Application(arch,lttng)
In [6]:
# arch.export('architecture_with_e2e_path.yaml')
In [7]:
path = app.get_path('e2e_path')
path.verify()
WARNING : 2024-01-16 12:48:19 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'. WARNING : 2024-01-16 12:48:19 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'. WARNING : 2024-01-16 12:48:19 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'. WARNING : 2024-01-16 12:48:19 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'. WARNING : 2024-01-16 12:48:19 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'. WARNING : 2024-01-16 12:48:19 | 'caret/rclcpp' may not be used in subscriber of '/BehaviorPlanner'. WARNING : 2024-01-16 12:48:19 | 'caret/rclcpp' may not be used in subscriber of '/MPCController'. WARNING : 2024-01-16 12:48:19 | 'caret/rclcpp' may not be used in subscriber of '/VehicleInterface'. WARNING : 2024-01-16 12:48:19 | 'caret/rclcpp' may not be used in subscriber of '/VehicleDBWSystem'.
Out[7]:
False
In [8]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[8]:
In [9]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[9]:
In [10]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
In [11]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-16 12:48:24 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [12]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
Hot Path¶
In [20]:
lttng = Lttng('./multi_threaded_executor_normal_fixed_workload')
arch = Architecture('yaml','./architecture_with_hot_path.yaml')
# arch = Architecture('lttng','./single_threaded_executor_normal')
app = Application(arch, lttng)
265025 events found.
loading: 100%|█████████████████████████████████████████████████████████████| 265025/265025 [00:07<00:00, 34240.71it/s]
In [14]:
path = app.get_path('hot_path')
path.verify()
WARNING : 2024-01-16 12:48:38 | 'caret/rclcpp' may not be used in subscriber of '/PointsTransformerFront'. WARNING : 2024-01-16 12:48:38 | 'caret/rclcpp' may not be used in subscriber of '/PointCloudFusion'. WARNING : 2024-01-16 12:48:38 | 'caret/rclcpp' may not be used in subscriber of '/RayGroundFilter'. WARNING : 2024-01-16 12:48:38 | 'caret/rclcpp' may not be used in subscriber of '/EuclideanClusterDetector'. WARNING : 2024-01-16 12:48:38 | 'caret/rclcpp' may not be used in subscriber of '/ObjectCollisionEstimator'.
Out[14]:
False
In [15]:
chain_latency(path, granularity='node', lstrip_s=0, rstrip_s=0)
Out[15]:
In [16]:
chain_latency(path, granularity='end-to-end', lstrip_s=0, rstrip_s=0)
Out[16]:
In [17]:
# plot best case
plot = Plot.create_response_time_timeseries_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
In [18]:
# plot best case
plot = Plot.create_response_time_histogram_plot(path, case='best')
plot.show()
WARNING : 2024-01-16 12:48:42 | The maximum number of legends drawn by default is 20. If you want all legends to be displayed, please specify the `full_legends` option to True.
In [19]:
# plot best case
plot = Plot.create_response_time_stacked_bar_plot(path, case='best')
plot.show()
BokehUserWarning: out of range integer may result in loss of precision BokehUserWarning: out of range integer may result in loss of precision
In [ ]: